<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    //函数调用模式
    function a() {
        var a="hello";
        console.log(this.hello);//undefind
        console.log(this);//window
    }
    a();//函数调用
    //方法调用模式
    var b={
        name:"hello b",
        sayName(){
            console.log(this.name);
        }
    }
    b.sayName();
</script>
</html>